<%@ page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<div>
    <spring:message code="console.webapp.label.book"/> |
    <a href="/book/${book.id}/edit"><spring:message code="console.webapp.label.edit"/></a> |
    <a href="/book/${book.id}/remove"><spring:message code="console.webapp.label.remove"/></a>
</div>
<ul>
    <li><b><spring:message code="console.webapp.label.id"/></b> ${book.id}</li>
    <li><b><spring:message code="console.webapp.label.createdDate"/></b> ${book.createdDate}</li>
    <li><b><spring:message code="console.webapp.label.lastUpdateDate"/></b> ${book.lastUpdateDate}</li>
    <li><b><spring:message code="console.webapp.label.title"/></b> ${book.title}</li>
    <li><b><spring:message code="console.webapp.label.description"/></b> ${book.description}</li>
    <li>
        <b><spring:message code="console.webapp.label.category"/></b>
        <a href="/category/${book.category.id}">${book.category.name}</a>
    </li>
    <li><b><spring:message code="console.webapp.label.authors"/></b>
        <ol>
            <c:forEach var="author" items="${book.authors}">
                <li>
                    <a href="/author/${author.id}">${author.fullName}</a>
                </li>
            </c:forEach>
        </ol>
    </li>
    <li><b><spring:message code="console.webapp.label.comments"/></b>
        <ol>
            <c:forEach var="comment" items="${book.comments}">
                <li>
                    <a href="/comment/${comment.id}">${comment.title}</a>
                </li>
            </c:forEach>
        </ol>
    </li>
</ul>